package com.xxwy.spring.event;

import org.springframework.context.ApplicationListener;

/**
 * 自定义Spring的事件监听器.
 *
 * @author xxwy
 * @date 2021/9/21 0021
 */
public class MyEventListener implements ApplicationListener<MySpringEvent> {
    @Override
    public void onApplicationEvent(MySpringEvent event) {
        System.out.printf("线程：%s-->%s", Thread.currentThread().getName(),event.getMessage());
    }
}
